package com.party.core.model.member;

import com.party.core.model.BaseModel;

/**
 * 商户数据统计详情
 * Created by wei.li.
 *
 * @date 2017/12/11 0011
 * @time 19:25
 */
public class MemberMerchantDetail extends BaseModel {
    private static final long serialVersionUID = -1184098398971354161L;

    //会员编号
    private String memberId;

    //商户总统计编号
    private String countId;

    //机构报名数
    private Integer applyNum;

    // 众筹成功数
    private Integer successNum;

    //机构订单数
    private Integer orderNum;

    //机构资金
    private Double money;

    //机构浏览量
    private Long viewNum;

    //机构会员数
    private Integer memberNum;

    //机构实名会员
    private Integer realMemberNum;

    public MemberMerchantDetail() {
    }

    public MemberMerchantDetail(Integer applyNum, Integer orderNum, Double money, Long viewNum, Integer memberNum, Integer realMemberNum) {
        this.applyNum = applyNum;
        this.orderNum = orderNum;
        this.money = money;
        this.viewNum = viewNum;
        this.memberNum = memberNum;
        this.realMemberNum = realMemberNum;
    }

    public MemberMerchantDetail(Integer applyNum, Integer successNum, Integer orderNum, Double money, Long viewNum, Integer memberNum, Integer realMemberNum) {
        this.applyNum = applyNum;
        this.orderNum = orderNum;
        this.money = money;
        this.viewNum = viewNum;
        this.memberNum = memberNum;
        this.realMemberNum = realMemberNum;
        this.successNum = successNum;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public Integer getApplyNum() {
        return null == applyNum ? 0 : applyNum;
    }

    public void setApplyNum(Integer applyNum) {
        this.applyNum = applyNum;
    }

    public Integer getOrderNum() {
        return null == orderNum ? 0 : orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public Double getMoney() {
        return null == money ? 0d : money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public Long getViewNum() {
        return viewNum;
    }

    public void setViewNum(Long viewNum) {
        this.viewNum = viewNum;
    }

    public Integer getMemberNum() {
        return memberNum;
    }

    public void setMemberNum(Integer memberNum) {
        this.memberNum = memberNum;
    }

    public Integer getRealMemberNum() {
        return realMemberNum;
    }

    public void setRealMemberNum(Integer realMemberNum) {
        this.realMemberNum = realMemberNum;
    }

    public String getCountId() {
        return countId;
    }

    public void setCountId(String countId) {
        this.countId = countId;
    }

    public Integer getSuccessNum() {
        return successNum;
    }

    public void setSuccessNum(Integer successNum) {
        this.successNum = successNum;
    }

    @Override
    public String toString() {
        return "MemberMerchantDetail{" +
                "memberId='" + memberId + '\'' +
                ", countId='" + countId + '\'' +
                ", applyNum=" + applyNum +
                ", successNum=" + successNum +
                ", orderNum=" + orderNum +
                ", money=" + money +
                ", viewNum=" + viewNum +
                ", memberNum=" + memberNum +
                ", realMemberNum=" + realMemberNum +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof MemberMerchantDetail)) return false;
        if (!super.equals(o)) return false;

        MemberMerchantDetail that = (MemberMerchantDetail) o;

        if (memberId != null ? !memberId.equals(that.memberId) : that.memberId != null) return false;
        if (countId != null ? !countId.equals(that.countId) : that.countId != null) return false;
        if (applyNum != null ? !applyNum.equals(that.applyNum) : that.applyNum != null) return false;
        if (successNum != null ? !successNum.equals(that.successNum) : that.successNum != null) return false;
        if (orderNum != null ? !orderNum.equals(that.orderNum) : that.orderNum != null) return false;
        if (money != null ? !money.equals(that.money) : that.money != null) return false;
        if (viewNum != null ? !viewNum.equals(that.viewNum) : that.viewNum != null) return false;
        if (memberNum != null ? !memberNum.equals(that.memberNum) : that.memberNum != null) return false;
        return realMemberNum != null ? realMemberNum.equals(that.realMemberNum) : that.realMemberNum == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (memberId != null ? memberId.hashCode() : 0);
        result = 31 * result + (countId != null ? countId.hashCode() : 0);
        result = 31 * result + (applyNum != null ? applyNum.hashCode() : 0);
        result = 31 * result + (successNum != null ? successNum.hashCode() : 0);
        result = 31 * result + (orderNum != null ? orderNum.hashCode() : 0);
        result = 31 * result + (money != null ? money.hashCode() : 0);
        result = 31 * result + (viewNum != null ? viewNum.hashCode() : 0);
        result = 31 * result + (memberNum != null ? memberNum.hashCode() : 0);
        result = 31 * result + (realMemberNum != null ? realMemberNum.hashCode() : 0);
        return result;
    }

}
